USE [aircond]
GO

/****** Object:  Table [dbo].[SCHEDULE_TERM_AUD]    Script Date: 03/15/2013 00:03:35 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[SCHEDULE_TERM_AUD](
	[SCHEDULE_ID] [numeric](19, 0) NOT NULL,
	[REV] [int] NOT NULL,
	[REVTYPE] [smallint] NULL,
	[updateDate] [datetime] NULL,
	[updateUser] [varchar](255) NULL,
	[Unmonitored] [varchar](255) NULL,
	[active] [char](1) NULL,
	[cmd] [varchar](255) NULL,
	[controlMode] [varchar](255) NULL,
	[errorMessage] [varchar](255) NULL,
	[execFri] [char](1) NULL,
	[execMon] [char](1) NULL,
	[execSat] [char](1) NULL,
	[execSun] [char](1) NULL,
	[execThu] [char](1) NULL,
	[execTue] [char](1) NULL,
	[execWed] [char](1) NULL,
	[fanSpeed] [varchar](255) NULL,
	[keyLock] [varchar](255) NULL,
	[lastExecuteTime] [datetime] NULL,
	[minimumTemperature] [varchar](255) NULL,
	[nid] [smallint] NULL,
	[scheduleHour] [varchar](255) NULL,
	[scheduleMin] [varchar](255) NULL,
	[start] [char](1) NULL,
	[temperature] [varchar](255) NULL,
	[windValue] [varchar](255) NULL,
	[machine_MACHINE_ID] [numeric](19, 0) NULL,
PRIMARY KEY CLUSTERED 
(
	[SCHEDULE_ID] ASC,
	[REV] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[SCHEDULE_TERM_AUD]  WITH CHECK ADD  CONSTRAINT [FK38E3FCE5BABE8053] FOREIGN KEY([REV])
REFERENCES [dbo].[AUD_REVISION] ([id])
GO

ALTER TABLE [dbo].[SCHEDULE_TERM_AUD] CHECK CONSTRAINT [FK38E3FCE5BABE8053]
GO

